﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Simple.Tools
/// <summary>
/// 版 本 钢易智企2.0 V 2.0.0 钢易智企2.0
/// Copyright (c) 2023 杭州钢易科技有限公司
/// 创建人：曾东明
/// 日 期：2024
/// 描 述：框架的配置类特性 name.name. 找到json对应的位置
/// </summary>
{
	/// <summary>
	/// 
	/// </summary>
	[AttributeUsage(AttributeTargets.Class)]
	public class ConfigurationAttribute : AbsAttribute
	{
		private string[] names;
		/// <summary>
		/// 
		/// </summary>
		/// <param name="name"></param>
		public ConfigurationAttribute(string name) : this(name,'.')
		{
			
		}
		/// <summary>
		/// 
		/// </summary>
		/// <param name="name"></param>
		/// <param name="splt"></param>
		public ConfigurationAttribute(string name,char splt) : base(name)
		{
			if (!SimpleCheck.IsNullOrEmpty(name))
			{
				names = name.ToArray(splt);
			}
			else
			{
				names=new string[0];
			}
		}
		/// <summary>
		/// 
		/// </summary>
		/// <returns></returns>
		public string[] GetNames()
		{
			return names;
		}
	}
}
